<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet"
	href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<title>Registered Users</title>
</head>
<body>
<div class="container">
	<h1>Registered Users Page</h1>
	<table style="text-align: center;" border="1px" cellpadding="0"
		cellspacing="0">
		<thead>
			<tr>
				<th width="25px">id</th>
				<th width="150px">username</th>
				<th >Full Name</th>
				<th >Email</th>
				<th >Address</th>
				<th >Telephone</th>
				<th >Role</th>
				<th >Action</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="user" items="${userList}">
				<tr>
					<td>${user.userID}</td>
					<td>${user.username}</td>
					<td>${user.fullName}</td>
					<td>${user.email}</td>
					<td>${user.address}</td>
					<td>${user.telephone}</td>
					<td>${user.role}</td>
					<td><a
						href="${pageContext.request.contextPath}/user/edit/${user.userID}">Edit</a><br />
						<a
						href="${pageContext.request.contextPath}/user/delete/${user.userID}">Delete</a><br />
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<a href="${pageContext.request.contextPath}/">Home page</a>
</div>
</body>
</html>